to_integer

pure function to_integer(): integer

Convert this decimal to an integer, truncating the fractional part.

Numerically equivalent to decimal.floor(), but with a type conversion.

Since

0.9.1

Throws

exception

if this decimal is greater than integer.MAX_VALUE or less than integer.MIN_VALUE.